package com.Dec_TwentyFour;

public class Solution70 {

    public int climbStairs(int n) {
        int[] dp=new int[n+3];
        dp[0]=0;
        dp[1]=1;
        dp[2]=2;
        for (int i=3;i<=n;i++)
        {
            dp[i]=dp[i-1]+dp[i-2];
        }
        return dp[n];
    }

    public static void main(String[] args) {
        Solution70 solution70=new Solution70();
        System.out.println(solution70.climbStairs(3));
    }

}
